package com.zplus.managers.petservices.services;

import com.zplus.managers.petservices.entities.AdoptRequest;

import java.util.List;

public interface AdoptRequestSerivces
{

    /**
     * create a new adopt request
     * @param ar new adopt request object
     * @return true - if success, false otherwise
     */
    boolean newAdoptReqest(AdoptRequest ar);

    /**
     * update the state of given request
     * @param ad request to be update
     * @param state new state
     * @return true if success, false otherwise
     */
    boolean updateRequestState(AdoptRequest ad, RequestState state);

    /**
     * delete given request
     * @param req request to be deleted
     * @return true if success, false otherwise
     */
    boolean deleteRequest(AdoptRequest req);

    /**
     *  get adopt request by date
     * @param date the date to be search
     * @return list of adopt request if success, null otherwise list of adopt request if success, null otherwise
     */
    List<AdoptRequest> getRequsetByDate(String date);

    /**
     * get request by give id
     * @param id target id
     * @return AdoptReqeust object if success, null otherwise
     */
    AdoptRequest getReqeustById(int id);

    /**
     * get requests of given state
     * @param state accpet 'reject', 'pass', 'uncheck'
     * @return the list contains requests of given state
     */
    List<AdoptRequest> getAllRequest(String state);
}
